home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / qbbs / multisb.zip / N2.BAT < prev   
DOS Batch File  |  1992-02-16  |  5KB  |  212 lines

  1. @ECHO OFF
  2.  
  3. REM Read Node 1 batch to get some info on this one, the two are basically the
  4. REM same except this one does no mail processing.
  5.  
  6.   if exist i:\fd\fd2.up goto FD_UP
  7.  
  8. Echo Clearing environemental variables...
  9.   set SHEZEX=
  10.   set SHEZWORK=
  11.   set LIST=
  12.  
  13. Echo Setting new variables...
  14.   set FD=C:\FD\FD2
  15.   set DSZLOG=I:\SBBS\DSZLOG.N2
  16.   set DSZPORT=2
  17.   set SUPER=Y
  18.   set TCNODE=2
  19.   set LOCK=9600
  20.   set BAUD=0
  21.   ansi
  22.   dc frame off /q
  23.  
  24. :FRT_DOOR
  25.   echo 
  26.   set BAUD=0
  27.   if not exist i:\fd\fd2.up rem > i:\fd\fd2.up
  28.   if exist e:\uploads\downloa2.* del e:\uploads\downloa2.* > nul
  29.   if exist i:\sbbs\n2.up del i:\sbbs\n2.up > nul
  30.   if exist c:\sbbs\n2\xrs\*.pkt goto XRSMAIL
  31.   %FOS%
  32.   c:
  33.   cd\sbbs
  34.   sbbsutil nodestatus 2 2
  35.   cd\fd\fd2
  36.   cls
  37.   fd
  38.   if errorlevel 255 goto FRT_DOOR
  39.   if exist c:\sbbs\n2\doorcfg.bbs del c:\sbbs\n2\doorcfg.bbs > nul
  40.   rem > i:\sbbs\n2.up
  41.   if errorlevel 214 goto 14400_baud
  42.   if errorlevel 196 goto 9600_baud
  43.   if errorlevel 148 goto 4800_baud
  44.   if errorlevel 124 goto 2400_baud
  45.   if errorlevel 112 goto 1200_baud
  46.   if errorlevel 103 goto 300_baud
  47.   if errorlevel 100 goto LOCAL
  48.   del i:\sbbs\n2.up > nul
  49.   if errorlevel  96 goto WAIT_FOR_OK
  50.   if errorlevel  95 goto NET_ECHO
  51.   if errorlevel  94 goto ECHO_ONLY
  52.   if errorlevel  93 goto NET_ONLY
  53.   if errorlevel  90 goto UNPACK_MAIL
  54.   if errorlevel  55 goto WEEKLY
  55.   if errorlevel  50 goto COMMO
  56.   if errorlevel  45 goto MIDNIGHT
  57.   if errorlevel  40 goto NIGHTLY
  58.   if errorlevel  10 goto QUIT
  59.   if errorlevel   5 goto MODEM_INIT
  60.   goto FRT_DOOR
  61.  
  62. :14400_baud
  63.   set BAUD=14400
  64.   cd\sbbs\n2
  65.   bbs -n2 -* -o100000 -b14400 -e0
  66.   goto BBS_ERRLVL
  67.  
  68. :9600_baud
  69.   set BAUD=9600
  70.   cd\sbbs\n2
  71.   bbs -n2 -* -o100000 -b9600 -e0
  72.   goto BBS_ERRLVL
  73.  
  74. :4800_baud
  75.   set BAUD=4800
  76.   cd\sbbs\n2
  77.   bbs -n2 -* -o100000 -b4800 -e0
  78.   goto BBS_ERRLVL
  79.  
  80. :2400_baud
  81.   set BAUD=2400
  82.   cd\sbbs\n2
  83.   bbs -n2 -* -o100000 -b2400 -e0
  84.   goto BBS_ERRLVL
  85.  
  86. :1200_baud
  87.   set BAUD=1200
  88.   cd\sbbs\n2
  89.   bbs -n2 -* -o100000 -b1200 -e0
  90.   goto BBS_ERRLVL
  91.  
  92. :300_baud
  93.   set BAUD=300
  94.   cd\sbbs\n2
  95.   bbs -n2 -* -o100000 -b300 -e0
  96.   goto BBS_ERRLVL
  97.  
  98. :LOCAL
  99.   set BAUD=0
  100.   cd\sbbs\n2
  101.   bbs -n2 -* -o100000 -l -e0
  102.   goto BBS_ERRLVL
  103.  
  104. :RELOAD
  105.   cd\sbbs\n2
  106.   bbs -n2 -* -o100000 -b%BAUD% -e0
  107.   goto BBS_ERRLVL
  108.  
  109. :RET_BBS
  110.   if exist c:\sbbs\n2\doorcfg.bbs del c:\sbbs\n2\doorcfg.bbs > nul
  111.   c:
  112.   cd\sbbs\n2
  113.   bbs -n2 -* -o100000 -R -e0
  114.  
  115. :BBS_ERRLVL
  116.   if errorlevel 80 goto RELOAD
  117.   if errorlevel 70 goto RET_BBS
  118.   if errorlevel 60 goto DOSDOOR
  119.   if errorlevel 50 goto LIST
  120.   if exist i:\sbbs\n2.up del i:\sbbs\n2.up
  121.   if errorlevel  5 goto NET_ECHO
  122.   if errorlevel  4 goto ECHO_ONLY
  123.   if errorlevel  3 goto NET_ONLY
  124.   if errorlevel  2 goto QUIT
  125.  
  126. :LOOPBACK
  127.   if %BAUD%==0 goto FRT_DOOR
  128.   dc beep 200,1 0,2 /r=2 /q
  129.   if exist sbbsswap.$$$ del sbbsswap.$$$ > nul
  130.   if exist i:\sbbs\n?.up goto FRT_DOOR
  131.   cd\sbbs
  132.   last 5 c:\sbbs\scallers.bbs
  133.   goto FRT_DOOR
  134.  
  135. :DOSDOOR
  136.   cd\sbbs\n2
  137.   QKDOOR QBBS GAP
  138.   DOORWAY.EXE SYS /i:c:\ext\doorpass /f /o:t /v:d^U /K:0 /C:DOS
  139.   goto RET_BBS
  140.  
  141. :LIST
  142.   cd\sbbs\n2
  143.   QKDOOR QBBS GAP
  144.   DOORWAY.EXE SYS /i:c:\ext\doorpass /f /o:t /v:d^U /p:c:\xtg\ld.com
  145.   goto RET_BBS
  146.  
  147. :COMMO
  148.   cd\commo
  149.   if not exist gedown.now goto FRT_DOOR
  150.   del i:\fd\fd2.up > nul
  151.   commo GEnie_Auto_Down
  152.   rem > i:\fd\fd2.up
  153.   goto FRT_DOOR
  154.  
  155. :MIDNIGHT
  156.   rem > c:\fd\fd1\fdexit.45
  157.   goto WAIT_FOR_OK
  158.  
  159. :NIGHTLY
  160.   rem > c:\fd\fd1\fdexit.40
  161.   goto WAIT_FOR_OK
  162.  
  163. :WEEKLY
  164.   rem > c:\fd\fd1\fdexit.55
  165.   goto WAIT_FOR_OK
  166.  
  167. :WAIT_FOR_OK
  168.   rem > i:\sbbs\fdevent.ok
  169.   wait! t i:\sbbs\fdevent.ovr
  170.   del i:\sbbs\fdevent.ovr > nul
  171.   goto FRT_DOOR
  172.  
  173. :NET_ECHO
  174. :ECHO_ONLY
  175.   rem > c:\fd\fd1\fdexit.95
  176.   goto LOOPBACK
  177.  
  178. :NET_ONLY
  179.   rem > c:\fd\fd1\fdexit.93
  180.   goto LOOPBACK
  181.  
  182. :XRSMAIL
  183.   copy c:\sbbs\n2\xrs\*.pkt c:\fd\inbound > nul
  184.   del c:\sbbs\n2\xrs\*.pkt > nul
  185.  
  186. :UNPACK_MAIL
  187.   rem > c:\fd\fd1\fdexit.90
  188.   goto FRT_DOOR
  189.  
  190. :MODEM_INIT
  191.   echo ~~~+++~~~ATH~~~ > COM1
  192.   be ask "Press A to abort FD startup! C to Continue." ca default=c timeout=9
  193.   if errorlevel 2 goto QUIT
  194.   goto FRT_DOOR
  195.  
  196. :FD_UP
  197.   cls
  198.   echo Node 2 of Frontdoor is allready running, check the windows...
  199.   echo Press ALT, then S to switch and see which windows are open.
  200.   echo If things don't look right and no one is on line 1 press ALT
  201.   echo then FX to run Fix Frontdoor nodes...
  202.   pause
  203.   exit
  204.  
  205. :QUIT
  206.   if exist i:\sbbs\n2.up del i:\sbbs\n2.up > nul
  207.   if exist i:\fd\fd2.up del i:\fd\fd2.up > nul
  208.   sbbsutil nodestatus 2 1
  209.   echo ATZ > COM2
  210.   exit
  211.  
  212.